package cn.yshujia.enums;

import lombok.Getter;

/**
 * @author YShuJia
 * @create 2024/4/23
 * @description 枚举响应码
 */


@Getter
public enum Info {
	
	SUCCESS(200, "成功！"),
	NEED_DECRYPTION(201, "成功！"),
	CODE_ERROR(202, "验证码错误！"),
	TRIGGER_LIMIT(203, "访问过于频繁，请稍候再试！"),
	AUTH_EXPIRES(204, "授权过期，请重新登录！"),
	MOVED_PERM(301, "资源已被移除！"),
	BAD_REQUEST(400, "参数列表错误！"),
	UNAUTHORIZED(403, "暂无权限访问，请登录后重试！"),
	HAD_USER(404, "该账号已注册！"),
	NOT_FOUND(404, "资源未找到！"),
	NON_USER(404, "找不到该用户！"),
	SERVER_ERROR(500, "服务器异常！");
	
	private final int code;
	
	private final String message;
	
	Info(int code, String msg) {
		this.code = code;
		this.message = msg;
	}
}